package com.itheima.pxgl.mapper;

import com.itheima.pxgl.annotation.AutoFill;
import com.itheima.pxgl.common.enumeration.OperationType;
import com.itheima.pxgl.entity.pojo.Novel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 九尾
 * @since 2024-05-19
 */
public interface NovelMapper extends BaseMapper<Novel> {
    @Select("select * from jw.novel where user_id = #{currentId}")
    List<Novel> getNovelByUserId(Long currentId);

    /**
     * 获取所有小说名称
     * @return
     */
    @Select("select novel.title from novel")
    List<String> listName();
}
